﻿using System;
using System.ServiceModel.DomainServices.Client;

namespace Warehouse.Silverlight.Core.Infrastructure.Events
{
    public class SubmitOperationEventArgs : ResultsArgs
    {
        private readonly SubmitOperation _submitOperation;

        public SubmitOperationEventArgs(Exception exception)
            : base(exception)
        {
            _submitOperation = null;
        }

        public SubmitOperationEventArgs(SubmitOperation submitOperation)
            : base(null)
        {
            _submitOperation = submitOperation;
        }

        public SubmitOperationEventArgs(SubmitOperation submitOperation, Exception exception)
            : base(exception)
        {
            _submitOperation = submitOperation;
        }

        public SubmitOperation SubmitOperation
        {
            get { return _submitOperation; }
        }
    }
}
